<core-block-course-blocks [courseId]="siteHomeId" [downloadEnabled]="downloadEnabled">
    <core-loading [hideUntil]="dataLoaded">
            <ion-list>
                <!-- Site home main contents. -->
                <ng-container *ngIf="section && section.hasContent">
                    <ion-item text-wrap *ngIf="section.summary">
                        <core-format-text [text]="section.summary" contextLevel="course" [contextInstanceId]="siteHomeId"></core-format-text>
                    </ion-item>

                    <core-course-module *ngFor="let module of section.modules" [module]="module" [courseId]="siteHomeId" [downloadEnabled]="downloadEnabled" [section]="section"></core-course-module>
                </ng-container>

                <!-- Site home items: news, categories, courses, etc. -->
                <ng-container *ngIf="items.length > 0">
                    <ion-item-divider *ngIf="section && section.hasContent"></ion-item-divider>
                    <ng-container *ngFor="let item of items">
                        <core-sitehome-all-course-list class="item" *ngIf="item == 'all-course-list'"></core-sitehome-all-course-list>
                        <core-sitehome-categories  *ngIf="item == 'categories'"></core-sitehome-categories>
                        <core-sitehome-course-search *ngIf="item == 'course-search'"></core-sitehome-course-search>
                        <core-sitehome-enrolled-course-list *ngIf="item == 'enrolled-course-list'"></core-sitehome-enrolled-course-list>
                        <core-sitehome-news *ngIf="item == 'news'"></core-sitehome-news>
                    </ng-container>
                </ng-container>
            </ion-list>

        <core-empty-box *ngIf="!hasContent" icon="qr-scanner" [message]="'core.course.nocontentavailable' | translate"></core-empty-box>
    </core-loading>
</core-block-course-blocks>
